import {useStore} from '@/store/index'
// 包租合同的状态
export const labelStatus: {
	[key: string | number]: any
} = {
	23: {
		name: '即将搬入',
		color: 'processing'
	},
	24: {
		name: '租约中',
		color: 'success'
	},
	25: {
		name: '即将到期',
		color: 'warning'
	},
	26: {
		name: '已到期',
		color: 'error'
	},
	27: {
		name: '已续租',
		color: 'cyan'
	},
	31: {
		name: '正常退',
		color: 'error'
	},
	32: {
		name: '违约退',
		color: 'error'
	},
	33: {
		name: '协议退',
		color: 'error'
	},
	34: {
		name: '未结算',
		color: 'error'
	},
	41: {
		name: '已作废',
		color: 'error'
	},
	42: {
		name: '已拒绝',
		color: ''
	}
}
//证件类型
export const certificationType: {
	[key: string | number]: any
} = {
	1: '身份证',
	2: '护照',
	3: '港澳通行证',
	4: '台湾同胞证',
	5: '军官证',
	6: '驾驶证'
}
export const operationType = [
	{
		name: '补签',
		id: 4,
		visible(item: any) {
			return (
				[23, 24, 25].includes(item.label) &&
				useStore().hasPermissions(['mk_contract_charter_party_bq']) &&
				['3', '-1'].includes(item.approvalStatus) &&
				item.signType !== 5
			)
		}
	},
	{
		name: '退租',
		id: 1,
		visible(item: any) {
			return (
				useStore().hasPermissions(['mk_contract_charter_party_tz']) &&
				[24, 25, 26].includes(item.label) &&
				['3', '-1'].includes(item.approvalStatus)
			)
		}
	},
	{
		name: '续租',
		id: 2,
		visible(item: any) {
			return (
				useStore().hasPermissions(['mk_contract_charter_party_xz']) &&
				[23, 24, 25, 26].includes(item.label) &&
				['3', '-1'].includes(item.approvalStatus)
			)
		}
	},
	{
		name: '作废',
		id: 3,
		visible(item: any) {
			return (
				useStore().hasPermissions(['mk_contract_charter_party_zf']) &&
				[23, 24, 25, 26].includes(item.label) &&
				['3', '-1'].includes(item.approvalStatus)
			)
		}
	},
	{
		name: '结算',
		id: 6,
		visible(item: any) {
			return (
				useStore().hasPermissions(['mk_contract_charter_party_tz']) &&
				[34].includes(item.label) &&
				['3', '-1'].includes(item.approvalStatus)
			)
		}
	}
]

export const tabList = [
	{
		key: '1',
		tab: '全部'
	},
	{
		key: '2',
		tab: '合约中'
	},
	{
		key: '5',
		tab: '已退租'
	},
	{
		key: '6',
		tab: '无效'
	}
]
// export const charterOtherTabList = [
// 	{
// 		key: '2',
// 		tab: '合约中'
// 	},
// 	{
// 		key: '5',
// 		tab: '已退租'
// 	},
// 	{
// 		key: '6',
// 		tab: '无效'
// 	}
// ]

//	成交方式
export const contractType = {
	1: '新签',
	2: '续签',
	3: '转租',
	4: '换房',
	5: '补签'
}

//付几
export const payMany = {
	// 付几（99-全付 100-随房租付 90-自定义）
	99: '全付',
	100: '随房租付',
	90: '自定义'
}

// 付款模式
export const paymentMode = {
	1: '提前付款',
	2: '固定付款日期',
	3: '提前一个月固定日期付款'
}

// 职业
export const profession = {
	1: '制造（生产/工艺/制造）',
	2: '房产（房产/建筑）',
	3: '金融（金融/银行/投资/保险）',
	4: '医疗(医疗/护理/制药)',
	5: '文化（文化/广告/传媒）',
	6: '法律（律师/法务）',
	7: '教育（教育/培训)',
	8: '行政（公务员/行政/事业单位)',
	9: '个体经营',
	10: '贸易',
	11: '物流',
	12: '模特',
	13: '空姐',
	14: '学生',
	15: '其他'
}
// 关系
export const emergencyType = {
	1: '父母',
	2: '兄弟姐妹',
	3: '同事',
	4: '同学',
	5: '朋友',
	6: '亲属',
	7: '配偶',
	8: '其它'
}
